Implementing HTMLArea 3.0 in ATutor 1.4

The visual content editor is a Javascript based WYSIWYG feature that can be used for adding and editing course content in HTML. This tool features options for text styles such as bold, underline, and subscript.  Paragraph options including right and full justification as well as right-to-left text are also supported.  The visual editor helps to insert elements including bullets and numbering, as well as links, images, and tables.  Other useful features include undo and redo options, a toggle to quickly switch between the display and the html code, and a full screen mode that allows user to use the visual editor on a separate window and resize their work area if needed.

Version 3.0 beta of the visual editor (called HMTLArea) was downloaded from http://www.interactivetools.com/products/htmlarea/
A patch for this version was also downloaded from http://www.interactivetools.com/forum/gforum.cgi?do=post_attachment;postatt_id=1194;guest=6782204


Adjustments made to the code are listed as follows:

1)  Note: Textarea should not be between <p> tags, else runtime error in IE
  
2)  Set:  (Line 46) this._customUndo = true;  to get undo/redo working properly for IE 6.0

3)  Uncomment lines 988-991:
		D = D.replace(/<strong><\/strong>/gi,'').
		replace(/<i><\/i>/gi,'').
		replace(/<P[^>]*><\/P>/gi,'');


4)  Comment lines: 1511-1514 to get rid of image style
/*			    case "f_border" : img.border = parseInt(value || "0"); break;
			    case "f_align"  : img.align	 = value; break;
			    case "f_vert"   : img.vspace = parseInt(value || "0"); break;
			    case "f_horiz"  : img.hspace = parseInt(value || "0"); break;
*/

5)  Comment out anything that has to do with image style (only leave url and alt) in insert_image.html (attributes such as "align" are not XHTML compliant)

6)   In fullscreen.html change line 114 from:
          HTMLArea._addEvent(window, 'resize', resize_editor);
      to
          if (!document.all) {HTMLArea._addEvent(window, 'resize', resize_editor);}
      Otherwise IE 6.0 freezes with some functions in fullscreen mode

7)  Around line 2073, replace the statement: html += closed ? " />" : ">";
     with
	if(root.tagName.toLowerCase() == 'p') {
	    html += closed ? "></p>" : ">";
	}
	else
	{
	    html += closed ? " />" : ">";
	}